<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ include file="/inc.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>闪耀先生-闪耀先生的邀请</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<!-- style -->
<link href="${pageContext.request.contextPath }/vip/css/usercenter.css"
	rel="stylesheet">
</head>
<body>
	<div class="invitbox">
		<img src="${pageContext.request.contextPath }/vip/images/invitimg.jpg">
	</div>
	<!--E .invitbox-->
	<div class="block buy">
		<form
			action="${pageContext.request.contextPath}/public/vipAction!revInv.action?openId=${fromOpenId}&code=${fromCode}"
			id="_formSub" method="post">
			<s:if test="#request.subMode == '00'   ">

				<div class="btnbox getinfo">
					<div class="inputbox">
						<ul>
							<li><input type="text" id="name" name="name"
								value="${name }" placeholder="您的姓名"
								onblur="javascript:_changeClass();"></li>
							<li><input type="text" id="phone" name="phone"
								value="${phone }" placeholder="手机号"
								onblur="javascript:_changeClass();"></li>
							</li>
						</ul>
					</div>
					<div class="button">
						<a href="##" onclick="javascript:_submit('${request.subMode}');"
							class="btn-org">接受<br>邀请
						</a>
					</div>
				</div>
			</s:if>
			<s:else>
				<div class="btnbox getinfo">
					<div class="inputbox">
						<ul>
							<li>该链接已失效!</li>
						</ul>
					</div>
				</div>



			</s:else>
			<p style="color: #333; border-bottom: 0;">接受朋友邀请，可参加一次闪耀会主题日活动。闪耀会，时尚商务人士的特权俱乐部。</p>
	</div>
	<!--E .block-->

	</form>
</body>
<script src="<%=basePath%>js/jquery-1.10.1.min.js"></script>
<script>
	function _changeClass() {
		var name = document.getElementById("name").value;
		var phone = document.getElementById("phone").value;
		if (name && phone) {
			$("#show").removeClass('graybg');
		} else {
			$("#show").addClass('graybg');
		}

	}
	function _submit(subMode) {
		if (subMode == "10") {
			alert("该链接已经失效!");
		} else {
			var name = document.getElementById("name").value;
			var phone = document.getElementById("phone").value;
			if (name && phone) {
				document.getElementById("_formSub").submit();
			} else {
				alert("姓名和手机号不能为空!");
			}
		}
	}
</script>
</html>